<ui:composition template="/xhtml/component/template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:t="http://myfaces.apache.org/tomahawk">
	<ui:define name="page">
		<h:form prependId="false">
			<t:saveState value="#{recommenderBean}" />
			<table align="center" width="100%">
				<tr>
					<td align="right" valign="top">
						<p:commandLink 	value="#{msg.label_insert_preferences}"
							action="#{recommenderBean.showPreferenceForm}" ajax="false" />
						<br/>
						<br/>
						<br/>
					</td>
				</tr>
				<tr>
					<td align="center" valign="top">
					<p:dataTable var="user"
						value="#{recommenderBean.users}" style="text-align: center; width: 500px;"
						paginator="true" paginatorPosition="bottom" rows="10">
						<p:column styleClass="user_column">
							<f:facet name="header">
								<h:outputText value="#{msg.label_user_email}" />
							</f:facet>
							<h:outputText value="#{user.email}" />
						</p:column>
						<p:column styleClass="column">
							<f:facet name="header">
								<h:outputText value="#{msg.label_options}" />
							</f:facet>
							<h:commandLink
								action="#{recommenderBean.showUserRecommendations}">
								<h:graphicImage alt="#{msg.label_show_recommendations}"
									title="#{msg.label_show_recommendations}"
									value="/xhtml/image/view_recommendations.png" styleClass="icon" />
								<f:setPropertyActionListener value="#{user}"
									target="#{recommenderBean.selectedUser}" />
							</h:commandLink>
						</p:column>
					</p:dataTable></td>
				</tr>
			</table>

		</h:form>
	</ui:define>
</ui:composition>